package com.reference.reference1.soft2;

public class Test2 {

	public static void main(String[] args) throws InterruptedException {
		EmployeeCache cache = EmployeeCache.getInstance();
		Employee em = cache.getEmployee("1");
		System.out.println("获取到：" + em);

		// 一次GC，但都没有被移除
		em = cache.getEmployee("2");
		System.out.println("获取到：" + em);

		// 一次FullGC
		em = cache.getEmployee("3");
		System.out.println("获取到：" + em);
	}

}
